package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TFlowDirectionInfoMapper;
import com.ruoyi.system.domain.TFlowDirectionInfo;
import com.ruoyi.system.service.ITFlowDirectionInfoService;

/**
 * 流向信息Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-29 10:50:42
 */
@Service
public class TFlowDirectionInfoServiceImpl implements ITFlowDirectionInfoService 
{
    @Autowired
    private TFlowDirectionInfoMapper tFlowDirectionInfoMapper;

    /**
     * 查询流向信息
     * 
     * @param flowDirectionId 流向信息主键
     * @return 流向信息
     */
    @Override
    public TFlowDirectionInfo selectTFlowDirectionInfoByFlowDirectionId(Long flowDirectionId)
    {
        return tFlowDirectionInfoMapper.selectTFlowDirectionInfoByFlowDirectionId(flowDirectionId);
    }

    /**
     * 查询流向信息列表
     * 
     * @param tFlowDirectionInfo 流向信息
     * @return 流向信息
     */
    @Override
    public List<TFlowDirectionInfo> selectTFlowDirectionInfoList(TFlowDirectionInfo tFlowDirectionInfo)
    {
        return tFlowDirectionInfoMapper.selectTFlowDirectionInfoList(tFlowDirectionInfo);
    }

    /**
     * 新增流向信息
     * 
     * @param tFlowDirectionInfo 流向信息
     * @return 结果
     */
    @Override
    public int insertTFlowDirectionInfo(TFlowDirectionInfo tFlowDirectionInfo)
    {
        tFlowDirectionInfo.setCreateTime(DateUtils.getNowDate());
        return tFlowDirectionInfoMapper.insertTFlowDirectionInfo(tFlowDirectionInfo);
    }

    /**
     * 修改流向信息
     * 
     * @param tFlowDirectionInfo 流向信息
     * @return 结果
     */
    @Override
    public int updateTFlowDirectionInfo(TFlowDirectionInfo tFlowDirectionInfo)
    {
        tFlowDirectionInfo.setUpdateTime(DateUtils.getNowDate());
        return tFlowDirectionInfoMapper.updateTFlowDirectionInfo(tFlowDirectionInfo);
    }

    /**
     * 批量删除流向信息
     * 
     * @param flowDirectionIds 需要删除的流向信息主键
     * @return 结果
     */
    @Override
    public int deleteTFlowDirectionInfoByFlowDirectionIds(Long[] flowDirectionIds)
    {
        return tFlowDirectionInfoMapper.deleteTFlowDirectionInfoByFlowDirectionIds(flowDirectionIds);
    }

    /**
     * 删除流向信息信息
     * 
     * @param flowDirectionId 流向信息主键
     * @return 结果
     */
    @Override
    public int deleteTFlowDirectionInfoByFlowDirectionId(Long flowDirectionId)
    {
        return tFlowDirectionInfoMapper.deleteTFlowDirectionInfoByFlowDirectionId(flowDirectionId);
    }

    /**
     * 查询所有流向信息
     *
     * @return 流向信息
     */
    @Override
    public List<TFlowDirectionInfo> selectTFlowDirectionInfoAll()
    {
        return tFlowDirectionInfoMapper.selectTFlowDirectionInfoAll();
    }
}
